The present invention relates to a computer having a control apparatus for controlling a resource shared by a plurality of programs, and in particular to a technique which is effective to a computer system and which causes a multiplexing network adapter for mutually coupling a plurality of computers to be usable from a plurality of user programs without mutual exclusion.
A loosely-coupled computer system connected to a network is disclosed in each of U.S. Pat. No. 5,617,424 entitled xe2x80x9cMethod of communication between network computers by dividing packet data into parts for transfer to respective regionsxe2x80x9d, filed by H. Murayama et al., on May 3, 1996, and issued on Apr. 1, 1997, and U.S. Pat. No. 5,935,205 entitled xe2x80x9cA computer system having a plurality of computers each controlling access to shared memory based on structural definition informationxe2x80x9d, filed by Murayama et al. on Jun. 21, 1996, and issued on Aug. 10, 1999.
In a certain conventional control apparatus which accesses a resource shared by a plurality of programs, mutual exclusion must be conducted by an operating system (OS) in order to provide a consistent operation for that shared resource. The reason why the OS must provide mutual exclusion because the shared resource may be shared by a plurality of programs and each program has no knowledge each other.
Processing of context saving recovery accompanying the mutual exclusion in OS, and the fact that mutual exclusion of a network adapter by a plurality of programs causes degraded performance are described in Douglas E. COMER et al., xe2x80x9cINTERNETWORKING WITH TCP/IP VOLUME IIxe2x80x9d, 1991, pp. 7-25, S. J. Leffler et al., xe2x80x9cThe Design and Implementation of the 4.3BSD UNIX Operating Systemxe2x80x9d, 1989, pp. 23 and 109-137, and Steven H. Rodrigues et al., xe2x80x9cHigh-Performance Local-Area Communication With Fast Socketsxe2x80x9d, January 1997.
An object of the present invention is to provide a technique allowing a plurality programs to access a resource without mutual exclusion in OS.
Another object of the present invention is to provide a common-resource control system preventing another processing request during execution of a certain processing request from a program.
According to the present invention, there is provided a control method of controlling a computer for controlling a resource connected to the computer and shared by a plurality of programs included in the computer, said control method comprising the steps of:
storing a control information ID in an OS space of a main memory, said control information ID indicating a storage area in said main memory storing control information concerning access between a certain program and said resource;
storing said control information ID in an adaptor connected to said main memory via a bus; and
taking out said control information from said storage area in said main memory included in said OS space, by using said control information ID stored in said adapter. It is possible to inform via said bus, that said adapter runs short of a storage area, when said adapter runs short of a storage area.
In a resource control apparatus for controlling a resource shared by a plurality of programs according to the present invention, a processing request to a resource is issued by writing a control information ID by means of single processing, then the processing request is accepted, and the processing is conducted in the resource.
In a resource control apparatus of the present invention, control information for conducting processing with respect to a resource is first stored in a certain area in a control information area, a control information ID indicating the area storing said control information is held in a control information ID buffer by a single write transaction, and a processing request is issued.
Subsequently, it is determined whether there is a vacant area in a FIFO storing a plurality of control information IDs. If there is a vacant area in the FIFO, then the control information ID held in the control information ID buffer is stored in the FIFO, and the processing request is accepted.
Subsequently, the control information ID is taken out from the FIFO, and the control information of the area corresponding to the control information ID is acquired from the control information area. Thus the processing is conducted.
In the resource control apparatus of the present invention, a processing request to a resource is conducted by a single write transaction into the control information ID buffer as described above. While a program issues a processing request to the shared apparatus, any other processing requests do not get in. Therefore, a plurality of programs can access the resource without mutual exclusion.
In the resource control apparatus of the present invention, a processing request to a resource is accepted by a single write transaction and the processing request is executed as heretofore described. Without mutual exclusion by using the OS, therefore, a plurality of programs can access the resource.